package com.iwomy.envpro.admin.api.feign;

import com.iwomy.envpro.admin.api.entity.SysDept;
import com.iwomy.envpro.admin.api.entity.SysDictItem;
import com.iwomy.envpro.common.core.constant.SecurityConstants;
import com.iwomy.envpro.common.core.constant.ServiceNameConstants;
import com.iwomy.envpro.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author envpro
 * @date 2020/5/12
 * <p>
 * 查询参数相关
 */
@FeignClient(contextId = "remoteDeptService", value = ServiceNameConstants.UPMS_SERVICE)
public interface RemoteDeptService {

	/**
	 * 查询所有部门
	 *
	 * @return
	 */
	@GetMapping("/dept/list")
	R<List<SysDept>> getAllByTenantId();
	/**
	 * 查询所有部门
	 *
	 * @return
	 */
	@GetMapping("/dept/map")
	R<Map<Long,SysDept>> getAllMapByTenantId();

	/**
	 * 查询所有部门
	 *
	 * @return
	 */
	@GetMapping("/dept/listByDeptId/{id}")
	R<List<Long>> listByDeptId(@PathVariable("id") Long id);

}
